<!DOCTYPE html>
<html ng-app="wx">

	<head>
		<title>微信跟单</title>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link rel="stylesheet" type="text/css" href="layui/css/layui.css" />
		<script type="text/javascript" src="js/jquery-3.2.1.min.js">
		</script>
		<script src="js/mui.min.js"></script>
		<script src="js/angular.js"></script>
		<script src="js/angular-route.js"></script>
		<script src="js/config.js"></script>
		<script src="js/echarts.common.min.js"></script>
		<script src="js/jquery.cookie.js"></script>
		<script src="js/BD.js"></script>
		<script src="controller/moreControl.js"></script>
		<script src="layui/layui.js" type="text/javascript" charset="utf-8"></script>

		<link href="css/mui.css" rel="stylesheet" />
		<link href="css/main.css" rel="stylesheet" />

		<script type="text/javascript" charset="utf-8">
		</script>

	</head>
	<!---->

	<body ng-controller="moreController">

			
		<div style="height: 3em;background: #EFEFF4;width: 100%;position: fixed;"></div>
		<div class="scroll" style="position:absolute; top:0; left:0; bottom:0; right:0;overflow:scroll; -webkit-overflow-scrolling: touch;">
			<ui-view></ui-view>
		</div>
	

	</body>

</html>
<script type="text/javascript">
	//$('body').height($('.scroll').height())
	var overscroll = function(el) {
		console.log(el)
		el.addEventListener('touchstart', function() {
			var top = el.scrollTop,
				totalScroll = el.scrollHeight,
				currentScroll = top + el.offsetHeight

			if(top === 0) {
				el.scrollTop = 1
			} else if(currentScroll === totalScroll) {
				el.scrollTop = top - 1
			}
		})
		el.addEventListener('touchmove', function(evt) {

			if(el.offsetHeight < el.scrollHeight)
				evt._isScroller = true
		})

	}
	overscroll($('.scroll')[0]);
//	console.log($('.scroll2')[0])
	document.body.addEventListener('touchmove', function(evt) {

		if(!evt._isScroller) {
			evt.preventDefault()
		}
	})
</script>